format debug "--  Compiling PlaySndAction Class . . .\n" undefined undefined

class PlaySndAction (Action)

	instance variables
		dap
end

method init self {class PlaySndAction} #rest args #key sndStream:(undefined) buffer:->
(	
	apply nextMethod self args
	
	self.dap := new DigitalAudioPlayer mediaStream:sndStream bufSize:buffer
	return self
)

method trigger self {class PlaySndAction} theTarget thePlayer ->
(	
	local dap := self.dap
	gotoBegin dap
	playUntil dap dap.duration
)

#(PlaySndAction, undefined, undefined)
